﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace _08.TasksSequence
{
    class TasksSequence
    {
        static void Main(string[] args)
        {
            int N = 7;
            List<int>[] tasks = new List<int>[N + 1];
            tasks[1] = new int[] { 2 }.ToList();
            tasks[2] = new int[] { 4, 5 }.ToList();
            tasks[3] = new int[] { 1 }.ToList();
            tasks[4] = new List<int>();
            tasks[5] = new List<int>();
            tasks[6] = new int[] { 2 }.ToList();
            tasks[7] = new int[] { 6 }.ToList();

            Graph graph = new Graph(tasks);

            graph.FindSequenceOfAllNodes();
        }
    }
}
